package com.aznest.config;

import cn.hutool.core.lang.Snowflake;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class SnowflakeConfig {
    @Bean
    public Snowflake snowflake() {
        // 参数为机器ID和数据中心ID，可以根据实际情况调整
        // 返回workerId为1，dataCenterId为1的雪花算法对象
        return new Snowflake(1, 1);
    }
}
